package cn.rengy.tool.excel;

public class HeaderCellObject extends CellObject{

    //表头的字段名，从数据库查询的结果集的字段名，表头和字段名可以一致
    //当表头是中文时，表格数据依据字段名从map对象中获取数据
    private String columnName;

    public HeaderCellObject(CellStyleObject cellStyleObject){
        super(cellStyleObject);
    }
    public static HeaderCellObject instance(CellStyleObject cellStyleObject){
        return new HeaderCellObject(cellStyleObject);
    }
    public String getColumnName() {
        if(columnName==null){
            columnName=getText();
        }
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }
}
